/**
 * 
 */
package com.ai.dmc.utils.sql;

import java.sql.SQLException;

import oracle.sql.CLOB;
/**
 * Title： 
 * Description： 
 * Copyright：Copyright (c) 2009
 * Company：北京亚信智慧数据科技有限公司
 * @author xc, May 3, 2016
 * @version 1.0
 */
public class SqlConvert {
    public static String clobToString(Object obj) throws SQLException{
        String str = null;
        if(obj == null){
            
        }else if(obj.getClass().toString().contains("CLOB")){
            CLOB clobTemp = (CLOB )obj;
            str = clobTemp.getSubString(1, (int) clobTemp.length());
        }else{
            str = (String) obj;
        }
        return str;
    }
}
